<?php
$detail = $detail ? $detail : '';
$detail = json_decode($detail, true);
?>
<ul>
<?php 
foreach ($detail as $k => $v){
  switch ($k) {
    case 'cid':
      $c = Tcate::where('cid', '=', $v)->first();
      echo "<li class='detail'>淘宝类型:&nbsp;{$c->name}</li>";
      break;
    case 'keyword':
      echo "<li class='detail'>关键字:&nbsp;{$v}</li>";
      break;
    case 'start_coupon_rate':
      echo "<li class='detail'>最低折扣率:&nbsp;{$v}%</li>";
      break;
    case 'end_coupon_rate':
      echo "<li class='detail'>最高折扣率:&nbsp;{$v}%</li>";
      break;
    default:
      break;
  }
}
?>
</ul>
